/*
Date:20210530 10:52AM
key:太麻烦了 整数和字符串转来转去
*/
class Solution {
public:
    string ct(const char&c)
    {
        return to_string((int)(c-97));
    }
    string nu(const string&s)
    {
        string s2="";
        bool flag=0;
        for(int i=0;i<s.size();i++)
        {
            if(s[i]=='a'&&flag==0)
            {
                continue;
            }else{flag=1;}
            if(flag)
            {
                s2=s2+ct(s[i]);
            }
            
        }
        if(flag){return s2;}
        else{s2="0";}
        return s2;
    }
    bool isSumEqual(string firstWord, string secondWord, string targetWord) 
    {
        if(stoi(nu(firstWord))+stoi(nu(secondWord))==stoi(nu(targetWord)))
        {
            return 1;
        }
        return 0;
    }
};